/*
 * @Description:
 * @Author: Zzt
 * @Date: 2022-09-20 15:51:23
 * @LastEditTime: 2023-03-10 15:09:39
 */

import { IPageQuery } from '@/interfaces/global';
import request from '@/utils/request';
// interface IFormatConversion {
/* 格式转换 */
// }
export function formatConversion(data: any) {
  return request({
    url: `/file-format-convert/`,
    method: 'post',
    data
  });
}

/* 查找案卷级备考表 */
export interface IFileNoteParams {
  arcNo?: string;
  atCode?: number;
  atType?: number;
  checkDate?: string;
  dbName?: string;
  description?: string;
  entryId?: number;
  inspector?: string;
  scribe?: string;
  scribeDate?: string;
  seeEachOtherNo?: string;
}

export function getFileNote(data: IFileNoteParams) {
  return request({
    url: `/archives/file-note/get/`,
    method: 'post',
    data
  });
}

/* 案卷级备考表保存 */
export function saveFileNote(data: IFileNoteParams) {
  return request({
    url: `/archives/file-note/save/`,
    method: 'post',
    data
  });
}

/* 盒内备考表查找 */
export function getBoxFileNote(id: Number | string) {
  return request({
    url: `/archive-box/file-note/${id}`,
    method: 'get'
  });
}
/* 盒备考表保存 */
export interface IBoxFileNoteParams {
  arranger?: string;
  boxId?: number;
  date?: string;
  description?: string;
  inspector?: string;
}
export function saveBoxFileNote(data: IBoxFileNoteParams) {
  return request({
    url: `/archive-box/file-note/save`,
    method: 'post',
    data
  });
}
export interface IFetchReciprocalSignParams {
  id?: number;
  sourceArchiveTypeId?: number;
  sourceDbName?: string;
  sourceEntryId?: number;
  sourceFondsId?: number;
  sourceLevel?: number;
  targetArchiveTypeId?: number;
  targetDbName?: string;
  targetEntryId?: number;
  targetFondsId?: number;
  targetLevel?: number;
  remark?: string;
}
/* 互见号查询列表 */
export function fetchReciprocalSign(data: IFetchReciprocalSignParams) {
  return request({
    url: `/archive-relation/list`,
    method: 'post',
    data
  });
}
/* 互见号保存 */
export function saveReciprocalSign(data: IFetchReciprocalSignParams) {
  return request({
    url: `/archive-relation/`,
    method: 'post',
    data
  });
}
/* 互见号分页查询列表 */
export function fetchReciprocalSignByPage(data: IPageQuery<IFetchReciprocalSignParams>) {
  return request({
    url: `/archive-relation/page`,
    method: 'post',
    data
  });
}
